<%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/layouts/include/taglib.jsp" %>

<!-- 修改几率-->
<div class="modal " id="projectRecordModen">
	 <div class="modal-dialog">
		<div class="modal-content">
				<div class="widget-header">
					<h4 class="lighter smaller">项目名称 修改记录</h4>
					<div class="widget-toolbar">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					</div>
				</div>
				<div class="widget-body">
					<div class="widget-main padding-0">
						<table id="update-prjRecord-List" class="table table-striped  table-hover">
								<thead>
									<tr>
										<th width="20%">修改项</th>
										<th width="20%">修改前的值</th>
										<th width="20%">修改后的值</th>
										<th width="20%">修改时间</th>
										<th width="20%">修改人</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
							<input type="hidden" name="busiId" id = "busiId">
					</div>
				</div>
		</div>
	</div>
</div>

 
 <script type="text/javascript">
 var busiId;
 function selectUpdatePrjRecord(){
		var updatePrjRecordTableColums = [//定义列
		                      {
		                    	  "mData":"name",
		                    	  "bSortable": false,
		                    	  "sClass": "center"
		                      },
		                      {
		                    	  "mData": "oldVal",
		                    	  "bSortable": false,
		                    	  "sClass": "center"
		                      },
		                      {
		                    	  "mData":"newVal",
		                    	  "bSortable": false,
		                    	  "sClass": "center"
		                      },
		                      {
		                    	  "mData":"logTm",
		                    	  "bSortable": false,
		                    	  "mData": function(data, type, row) {
		          						return DateUtil.dateFormat(data.logTm);
		          				  },
		          				  "sClass": "center"
		                      },
		                      {
			          			  "mData":"empName",
			          			  "bSortable": false,
			          			  "sClass": "center"
			          		  }
		              ];
		          	
		              //初始化dataTable
		          	datatablePrjRecord = $('#update-prjRecord-List').dataTable( {
		              	'sAjaxSource': '${ctx}/sys/log/queryRecordPage.do',	//请求数据源 
		              	"fnServerData": function(sSource, aoData, fnCallback,oSettings){
		            		$.extend(aoData,$('#busiId').serializeArray());
		            		$.ajax({
		        	    		dataType: 'json',
		        	    		url : sSource,
		        	    		data: aoData,
		        	    		success: fnCallback
		            		});		
		              	},
		          		'bServerSide':true,							//是否启动服务器端数据导入
		          		"bLengthChange" : false,
		          		"bInfo" : true,
		          		"bPaginate" : true,
	                  	'bFilter': false,                       	//是否使用内置的过滤功能。
	                  	'aoColumns': updatePrjRecordTableColums,
	                 	"sDom": '<"toolbar">frtip', 
	                   	"oLanguage": oLanguage
		          	});             
	}

function updatePrjRecord(id){
	
	$("#busiId").val(id);
	var oSettings = datatablePrjRecord.fnSettings();
	oSettings._iDisplayStart = 0;
	datatablePrjRecord.fnClearTable(0); //清空数据
	//datatablePrjRecord.set('sAjaxSource','${ctx}/sys/log/queryRecordPage.do?busiId='+busiId);	//请求数据源 
	datatablePrjRecord.fnDraw(); //重新加载数据 
}
</script>

         

         
         
         
 

